package com.bqkj.controller;

import com.bqkj.IService.SchedualServiceHi;
import com.bqkj.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class HiController {

    @Autowired
    SchedualServiceHi schedualServiceHi;
    @RequestMapping(value = "/hi",method = RequestMethod.GET)
    public List<User> sayHi(){
        List<User> users = schedualServiceHi.sayHiFromClientOne();
        for (User user : users) {
            System.out.println(user.getId()+":"+user.getName());
        }
        return users;
    }
}